package spring.DI.methodDI;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * 抽象父类：动物
 *
 * @author ME
 * @date 2019/2/26 17:58
 */
public abstract class Animal {

    @Autowired
    private Dog dog;

    public Dog getDog() {
        return dog;
    }

    // setter注入
    public void setDog(Dog dog) {
        this.dog = dog;
    }

    // 仅用于 lookup-method 注入, 无需实现
    public abstract Dog createDog();

}
